(function($) {
//$.get('/data/info/repo', function(res) {
//  console.log(res)
//})

//$.get('/data/info/apiTest',function(res){
//	console.log(res)
//})
layui.use(['carousel'], function(){

  var carousel = layui.carousel;
  carousel.render({
    elem: '#lunboPic',
    width: '100%', //设置容器宽度
    height:'350px',
    arrow: 'always', //始终显示箭头
    interval:'3500'
    //,anim: 'updown' //切换动画方式
  });
  carousel.render({
    elem: '#lunboPic2',
    width: '100%', //设置容器宽度
    height:'180px',
    indicator:'none',
    interval:'2000'
//  arrow: 'none' //始终显示箭头
    //,anim: 'updown' //切换动画方式
  });
  
});


(function () {
	 	var sideMenu = $("div.sideMenu"); 
	 	if(sideMenu == "undefined") return ;
	 	var h3 = sideMenu.find("h3");
	 	var ul = sideMenu.find("ul");
	 	var activeNum = 0;	
	 	var isAct = true;		
	 	ul.hide();
	 	avtive(4);
	 	h3.each(function (i) {
	 		(function (i) {
	 			h3.eq(i).mouseenter(function () {
	 				if (activeNum == i) return;
	 				avtive(i);
	 			});
	 		})(i)
	 	});
	 	function avtive (num) {
	 		if (!isAct) return;
	 		isAct = false;
	 		ul.eq(num).slideDown("normal");
	 		ul.eq(activeNum).slideUp("normal",function () {
	 			isAct = true;
	 		});
	 		activeNum = num;
	 	}
})()


var timer;
timer=setInterval("scrollDIV(document.getElementById('timeline'))",50)
$("#timeline").mouseover(function(){
	clearInterval(timer)
}).mouseout(function(){
	timer=setInterval("scrollDIV(document.getElementById('timeline'))",50)
})

})(jQuery)


function scrollDIV(obj){
	var temp=(obj.scrollTop)++;
	if(obj.scrollTop==temp) obj.innerHTML+=obj.innerHTML;
	if(obj.scrollTop>=obj.firstChild.offsetHeight) obj.scrollTop=0;  
}